package com.hs.mapper;

import com.hs.entity.Course;
import com.hs.entity.Grade;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface GradeMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Grade record);

    int insertSelective(Grade record);

    Grade selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Grade record);

    int updateByPrimaryKey(Grade record);
    //查询学生成绩信息列表
    public List<Grade> findGradeList(@Param("searchKey") String searchKey);
    //录入平时成绩和考试成绩
    public Integer setGrade(@Param("id") Integer id,@Param("usualscore") String usualscore,@Param("testscore") String testscore,@Param("score") String score);

    List<Grade> findGradeListBySid(@Param("sid")String sid);

    List<Map<String, Object>> queryEchartsByStudentId(@Param("studentId") Integer studentId);

    Integer countExamTime(@Param("studentId") String studentId);

    Double calAverageScore(@Param("studentId") String studentId);

    Integer countFailTime(@Param("studentId") String studentId);

    Integer countTotalTime();

    Double calAllAverageScore();

    Integer examFind(@Param("paperId") String paperId,@Param("studentId")  String studentId);
}